package com.itshizhan.itjidancideveloper.models;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@EntityListeners(AuditingEntityListener.class)
@Data
@Entity
@Table(name = "user")
public class User {
	@Id
	private Long id;
	private String account;
	private String password;
	@Column(name = "nick_name")
	private  String nickName;
	private String email;
	private String avatar;
	@CreatedDate
	@Column(name = "create_time")
	private Date createTime;
	@LastModifiedDate
	@Column(name = "update_time")
	private Date updateTime;
	@Column(name = "role_id")
	private int roleId;
	private int valid;

}
